3.173 \(\int \frac {a+b \log (c x^n)}{x (d+e \log (f x^m))} \, dx\)

Optimal. Leaf size=71 \[ \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac {b n \log (x)}{e m} \]

[Out]

b*n*ln(x)/e/m-b*n*(d+e*ln(f*x^m))*ln(d+e*ln(f*x^m))/e^2/m^2+(a+b*ln(c*x^n))*ln(d+e*ln(f*x^m))/e/m

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 6, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2302, 29, 2366, 12, 2389, 2295} \[ \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac {b n \log (x)}{e m} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x*(d + e*Log[f*x^m])),x]

[Out]

(b*n*Log[x])/(e*m) - (b*n*(d + e*Log[f*x^m])*Log[d + e*Log[f*x^m]])/(e^2*m^2) + ((a + b*Log[c*x^n])*Log[d + e*
Log[f*x^m]])/(e*m)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2302

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2366

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.))*((g_.)*(x_))^(m_.), x_Sy
mbol] :> With[{u = IntHide[(g*x)^m*(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[Sim
plifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, r}, x] &&  !(EqQ[p, 1] && EqQ[a, 0] &&
 NeQ[d, 0])

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{x \left (d+e \log \left (f x^m\right )\right )} \, dx &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-(b n) \int \frac {\log \left (d+e \log \left (f x^m\right )\right )}{e m x} \, dx\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {(b n) \int \frac {\log \left (d+e \log \left (f x^m\right )\right )}{x} \, dx}{e m}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {(b n) \operatorname {Subst}\left (\int \log (d+e x) \, dx,x,\log \left (f x^m\right )\right )}{e m^2}\\ &=\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}-\frac {(b n) \operatorname {Subst}\left (\int \log (x) \, dx,x,d+e \log \left (f x^m\right )\right )}{e^2 m^2}\\ &=\frac {b n \log (x)}{e m}-\frac {b n \left (d+e \log \left (f x^m\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e^2 m^2}+\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (d+e \log \left (f x^m\right )\right )}{e m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 58, normalized size = 0.82 \[ \frac {\log \left (d+e \log \left (f x^m\right )\right ) \left (a e m+b e m \log \left (c x^n\right )-b d n-b e n \log \left (f x^m\right )\right )+b e m n \log (x)}{e^2 m^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x*(d + e*Log[f*x^m])),x]

[Out]

(b*e*m*n*Log[x] + (a*e*m - b*d*n - b*e*n*Log[f*x^m] + b*e*m*Log[c*x^n])*Log[d + e*Log[f*x^m]])/(e^2*m^2)

________________________________________________________________________________________

fricas [A]  time = 0.75, size = 51, normalized size = 0.72 \[ \frac {b e m n \log \relax (x) + {\left (b e m \log \relax (c) - b e n \log \relax (f) + a e m - b d n\right )} \log \left (e m \log \relax (x) + e \log \relax (f) + d\right )}{e^{2} m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="fricas")

[Out]

(b*e*m*n*log(x) + (b*e*m*log(c) - b*e*n*log(f) + a*e*m - b*d*n)*log(e*m*log(x) + e*log(f) + d))/(e^2*m^2)

________________________________________________________________________________________

giac [A]  time = 0.39, size = 85, normalized size = 1.20 \[ \frac {b n e^{\left (-1\right )} \log \relax (x)}{m} + \frac {{\left (b m e \log \relax (c) - b n e \log \relax (f) - b d n + a m e\right )} e^{\left (-2\right )} \log \left (\frac {1}{4} \, {\left (\pi m {\left (\mathrm {sgn}\relax (x) - 1\right )} e + \pi {\left (\mathrm {sgn}\relax (f) - 1\right )} e\right )}^{2} + {\left (m e \log \left ({\left | x \right |}\right ) + e \log \left ({\left | f \right |}\right ) + d\right )}^{2}\right )}{2 \, m^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="giac")

[Out]

b*n*e^(-1)*log(x)/m + 1/2*(b*m*e*log(c) - b*n*e*log(f) - b*d*n + a*m*e)*e^(-2)*log(1/4*(pi*m*(sgn(x) - 1)*e +
pi*(sgn(f) - 1)*e)^2 + (m*e*log(abs(x)) + e*log(abs(f)) + d)^2)/m^2

________________________________________________________________________________________

maple [C]  time = 0.44, size = 1744, normalized size = 24.56 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*ln(c*x^n)+a)/x/(e*ln(f*x^m)+d),x)

[Out]

1/2*I/m*ln(Pi*e*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-Pi*e*csgn(I*f)*csgn(I*f*x^m)^2-Pi*e*csgn(I*x^m)*csgn(I*f*x
^m)^2+Pi*e*csgn(I*f*x^m)^3+2*I*e*ln(f)+2*I*ln(x^m)*e+2*I*d)/e*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I/m*ln(Pi*e
*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^m)-Pi*e*csgn(I*f)*csgn(I*f*x^m)^2-Pi*e*csgn(I*x^m)*csgn(I*f*x^m)^2+Pi*e*csgn
(I*f*x^m)^3+2*I*e*ln(f)+2*I*ln(x^m)*e+2*I*d)/e*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-1/2*I/m*ln(Pi*e*csgn(I
*f)*csgn(I*x^m)*csgn(I*f*x^m)-Pi*e*csgn(I*f)*csgn(I*f*x^m)^2-Pi*e*csgn(I*x^m)*csgn(I*f*x^m)^2+Pi*e*csgn(I*f*x^
m)^3+2*I*e*ln(f)+2*I*ln(x^m)*e+2*I*d)/e*b*Pi*csgn(I*c*x^n)^3+1/2*I/m*ln(Pi*e*csgn(I*f)*csgn(I*x^m)*csgn(I*f*x^
m)-Pi*e*csgn(I*f)*csgn(I*f*x^m)^2-Pi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(I*f)*csgn(I*f*x^m)^2-Pi*e*csgn(I*x^m)*csgn(I*f*x^m)^2+Pi*e*csgn(I*f*x^m)^3+2*I*ln(x
)*e*m+2*I*e*ln(f)+2*I*(-m*ln(x)+ln(x^m))*e+2*I*d)*d*n

________________________________________________________________________________________

maxima [A]  time = 0.67, size = 118, normalized size = 1.66 \[ \frac {b \log \left (c x^{n}\right ) \log \left (\frac {e \log \relax (f) + e \log \left (x^{m}\right ) + d}{e}\right )}{e m} - \frac {b n {\left (\frac {{\left (e \log \relax (f) + e \log \left (x^{m}\right ) + d\right )} \log \left (\frac {e \log \relax (f) + e \log \left (x^{m}\right ) + d}{e}\right )}{e} - \frac {e \log \relax (f) + e \log \left (x^{m}\right ) + d}{e}\right )}}{e m^{2}} + \frac {a \log \left (\frac {e \log \relax (f) + e \log \left (x^{m}\right ) + d}{e}\right )}{e m} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(d+e*log(f*x^m)),x, algorithm="maxima")

[Out]

b*log(c*x^n)*log((e*log(f) + e*log(x^m) + d)/e)/(e*m) - b*n*((e*log(f) + e*log(x^m) + d)*log((e*log(f) + e*log
(x^m) + d)/e)/e - (e*log(f) + e*log(x^m) + d)/e)/(e*m^2) + a*log((e*log(f) + e*log(x^m) + d)/e)/(e*m)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {a+b\,\ln \left (c\,x^n\right )}{x\,\left (d+e\,\ln \left (f\,x^m\right )\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(x*(d + e*log(f*x^m))),x)

[Out]

int((a + b*log(c*x^n))/(x*(d + e*log(f*x^m))), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a + b \log {\left (c x^{n} \right )}}{x \left (d + e \log {\left (f x^{m} \right )}\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x/(d+e*ln(f*x**m)),x)

[Out]

Integral((a + b*log(c*x**n))/(x*(d + e*log(f*x**m))), x)

________________________________________________________________________________________